<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    .bg{
        width: 300px;
        height: 300px;
        background: crimson;
    }
    </style>
</head>
<body>
<div id="box">
    我是box
</div>
<script src="js/jquery-3.6.0.min.js"></script>
<script>
$(function(){
    /* $("#box").css("background","red");
    console.log($("#box").css("fontSize")); */
    // $("#box").css({
    //     background:"yellow",
    //     color:"#fff",
    //     marginLeft:200,
    // });
    $("#box").addClass("bg");
})
</script>
</body>
</html>